﻿
var mailBox = $("#myMailCountInfo");
function peekMailCount() {
    if (typeof CallServerMethod != 'undefined') {
        CallServerMethod(null, null);
    }
}
//下面的方式是当接收服务器方法处理的结果发生异常时调用的方法 
function Error(args, context) {
    mailBox.html("抽取邮箱信息失败。").css("color", "red"); clearInterval(timer);
}

//下面的方法是接收并处理服务器方法执行的返回结果
function Success(args, context) {
    var _info = args;

    if (_info == "unline") {
        alert("您还没有登录,请先登录。 ");
        window.location = "../Default.aspx";
    }
    else {  //"";
        var info = _info.split(",");

        var hasNew = info[0] > 0;
        var r = "<span class=\"m_" + (hasNew ? "red" : "black") + "\">" + info[0] + " 未读&nbsp;</span>";
        $("#myMailCountInfo").html(r);
        if (hasNew) {
            mailBox.attr("title", info[2]);
            //$("#L11").text("收件箱(" + info[0] + ")");
            //Show NewMail SimpleInfo PopupBox
            //            $("#m-Count").text(info[0] + " 未读 ; ");
            //            $("#m-last").text(info[2]);
            //            $("#PopupBox").attr("title", "单击转到收件箱...");
            //ShowNewMail();
        }
        else {
            mailBox.attr("title", "单击转到收件箱...");
            //            $("#L11").text("收件箱");
            //            $("#menu_index").find("#L11").text("收件箱");
        }
    }
}

function showSchedule() {
    tipsWindown("闽江学院-软件学院 校历", "iframe: Profile/Schedule.aspx?from=main", "630", "440", "true", "", "", "true", "", "true");   //

}